<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            height: 100px;
            width: 100px;
            position: absolute;
            transform:  translate(-50%,-50%);
            transform-style: preserve-3d;
            perspective: 8000px;
            transform-origin: center center;
            left: 200px;
            top: 200px;
            transform: rotateX(0deg) rotateY(0deg);
            animation-name: moveAAA;
            animation-duration: 10s;
            left: 50%;
            top: 50%;
        }
        .inner{
            height: 100px;
            width: 100px;
            position: absolute;
        }
        .qian{
            background-color: aqua;
            opacity: 0.8;
            transform: translateZ(-50px);
        }
        .back{
            background-color: rgb(174, 100, 3);
            opacity: 0.8;
            transform: translateZ(50px);
        }
        .up{
            background-color: red;
            transform: rotateX(90deg) translateZ(50px);
        }
        .down{
            background-color: pink;
            transform: rotateX(90deg) translateZ(-50px);
        }
        .left{
            background-color: greenyellow;
            transform: rotateY(90deg) translateZ(50px);
        }
        .right{
            background-color: yellow;
            transform: rotateY(90deg) translateZ(-50px);
        }
        @keyframes moveAAA{
            0%{
                transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
            }
            100%{
                transform: rotateX(1000deg) rotateY(1000deg) rotateZ(1000deg);
            }
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="inner qian"></div>
        <div class="inner back"></div>
        <div class="inner up"></div>
        <div class="inner down"></div>
        <div class="inner left"></div>
        <div class="inner right"></div>
    </div>
</body>
</html>